package com.jzo2o.customer.controller.agency;

import com.jzo2o.customer.model.dto.request.AgencyCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.model.dto.response.RejectReasonResDTO;
import com.jzo2o.customer.service.IAgencyCertificationService;
import com.jzo2o.customer.service.IWorkerCertificationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 实名认证相关接口
 *
 * @author itcast
 * @create 2023/9/11 16:14
 **/
@RestController("AgencyCertificationAuditController")
@RequestMapping("/agency/agency-certification-audit")
@Api(tags = "机构端 - 实名认证相关接口")
public class AgencyCertificationAuditController {
    @Autowired
    private IAgencyCertificationService certificationService;

    /**
     * 提交实名认证
     * @param reqDTO
     * @return
     */
    @PostMapping
    public Boolean addOrUpdate(@RequestBody AgencyCertificationAuditAddReqDTO reqDTO){
        return certificationService.add(reqDTO);
    }
    /**
     *  查询最新的驳回原因
     * @param
     * @return
     */
    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public RejectReasonResDTO getRejectReason() {
        return certificationService.getRejectReason();
    }
}
